home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / mc51bugs.zip / Q32943 < prev    next >
Text File  |  1988-07-29  |  971b  |  53 lines

  1. Q32943 Typedef Structure Member Causes Error C2059
  2. C Compiler
  3. 5.10   | 5.10
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.    The valid code below will cause the C2059 "Typedef name" error.
  8. This error does not occur if the member of structure C is a non-pointer
  9. type.
  10.    A workaround for this problem is to use a distinct name for the
  11. "char *B" element or declare a typedef pointer and use this to type
  12. "B". The following is an example:
  13.  
  14.    typedef char *pointer ;
  15. typedef struct
  16.  {
  17.    pointer B ;
  18.  } ;
  19.  
  20. main()
  21. {
  22. }
  23.  
  24.    Microsoft has confirmed this to be a problem with Version 5.10 of
  25. the C compiler. Microsoft is researching this problem and will post
  26. new information as it becomes available.
  27.  
  28. More Information:
  29.    The following is a sample code that causes the error:
  30.  
  31. typedef struct
  32.  {
  33.    int a ;
  34.  } B ;
  35.  
  36. typedef struct
  37.  {
  38.    char *B ;
  39.  } ;
  40.  
  41. main()
  42. {
  43. }
  44. typedef struct
  45.  {
  46.    int a ;
  47.  } B ;
  48.  
  49.  
  50.  
  51. Keywords:  buglist5.10
  52. Updated  88/07/29 12:16
  53.